package com.bocloud.mappers;

import com.bocloud.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

@Mapper
@CacheConfig(cacheNames = "users")
public interface UserMapper {
    List<User> getAll();

    Integer selCount();

    Integer selNum(User user);

    List<User> getBy(User user);

    void insert(User user);

    List<User> selAllSuperior();

    List<User> selSuperior(User user);

    User selRole(User user);

    @Cacheable(key = "#u0")
    User selByJobNum(User user);

    void update(User user);

    void updateRole(User user);

    void delete(String jobNum);

}
